﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL.PayRecordsTransaction;

namespace FamilyManager
{
    public partial class PayRecordStatisticsForm : Form
    {
        private IList<int> recordsOIDs;

        public PayRecordStatisticsForm(IList<int> _RecordsOIDs)
        {
            InitializeComponent();

            recordsOIDs = _RecordsOIDs;
        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        

        private void PayRecordStatisticsForm_Load(object sender, EventArgs e)
        {
            StatsPayRecordsTransaction objStatsPayRecordsTransaction = new StatsPayRecordsTransaction(recordsOIDs);
            PayStatisticsObject objPayStatisticsObject = objStatsPayRecordsTransaction.PayStatistics;
            lbBeginDate.Text = objPayStatisticsObject.BeginDate.ToShortDateString();
            lbEndDate.Text = objPayStatisticsObject.EndDate.ToShortDateString();
            lbCrossingDays.Text = objPayStatisticsObject.CrossingDays.ToString();
            lbPayTotal.Text = objPayStatisticsObject.PayTotal.ToString();
            lbAvgDayPaySum.Text = objPayStatisticsObject.AvgDayPaySum.ToString();
            lbNecessaryPays.Text = objPayStatisticsObject.NecessaryPays.ToString();
            lbNoNecessaryPays.Text = objPayStatisticsObject.NoNecessaryPays.ToString();
            lbWastefulPays.Text = objPayStatisticsObject.WastefulPays.ToString();
        }
    }
}
